//
//  UIImageView+Gif.h
//  ZFGifDecoderDemo
//
//  Created by 赵梁 on 2016/12/13.
//  Copyright © 2016年 zify. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImageView (ZF_Gif)

#pragma mark - gif name
- (void)zf_animationGifWithNamed:(NSString *)gifImageName endWithImage:(UIImage*)endImage withRepeatCount:(NSUInteger)repeatCount;
/**
 只执行一次的GIF 结束执行completion block

 @param gifImageName gif图片名称
 @param endImage 结束替换图片
 @param completion 结束执行block
 */
- (void)zf_animationOnceGifWithNamed:(NSString *)gifImageName endWithImage:(UIImage *)endImage completion:(void (^)(void))completion;


#pragma mark - gif data

- (void)zf_animationGifWithData:(NSData *)data endWithImage:(UIImage*)endImage withRepeatCount:(NSUInteger)repeatCount;

/**
 只执行一次的GIF 结束执行completion block
 
 @param data gif图片数据
 @param endImage 结束替换图片
 @param completion 结束执行block
 */
- (void)zf_animationOnceGifWithData:(NSData *)data endWithImage:(UIImage *)endImage completion:(void (^)(void))completion;

@end

